n = int(input())
s=[]
for i  in range(n):
    str1=input().split()
    s.append(str1)
    print(s)
lst=[]
for i in range(len(s)):
    for j in range(len(s[i])):
        lst.append(s[i][j])
lst=set(lst)

lst=list(lst)
lst.sort()
for i in range(len(lst)):
    print(lst[i],end="")
